<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用公共文件

/**
 * api接口返回
 * @param int $code 状态码
 * @param string $msg 文字信息
 * @param array $data 返回数据
 * @return \think\response\Json
 */
function apiReturn($code, $msg = '', $data = [],$extend = []){
    $return = array(
        'code' => $code,
        'msg' => $msg,
        'data' => $data,
        'extend' => $extend,
    );
    return json($return);
}
